home *** CD-ROM | disk | FTP | other *** search
-
-
- ******* ColEm *******
- The Portable ColecoVision Emulator
- version 0.4
-
- by Marat Fayzullin
-
- email: fms@freeflight.com
- IRC: RST38h
- WWW: http://www.freeflight.com/fms/
-
-
-
- * NEW IN THIS VERSION *
-
- o Z80 emulation sped up
- o Saving music into a file
- o Separate autofire for fire buttons
-
-
-
- * INTRODUCTION *
-
- Please, *carefully* read this manual. Do not write me email with
- questions answered in here, as such letters are going to be ignored: I
- have too many other things to do to answer the same questions over and
- over again.
-
- ColEm is a portable emulator of the old ColecoVision videogame console
- written in C. You can always get the latest ColEm source code, binaries,
- and support files from
-
- http://www.freeflight.com/fms/ColEm/
-
- Another Coleco-related archive is located at
-
- ftp://ftp.komkon.org/pub/Coleco/
-
- There are versions of ColEm for Amiga, Macintosh, and IBM PC (both
- MeSsyDOS and Windoze). Following people are maintaining ports of ColEm to
- these systems:
-
- Amiga: Hans Guijt [jguijt@wi.LeidenUniv.nl]
- MSDOS: Marcel de Kogel [m.dekogel@student.utwente.nl]
- Windows: Neal Danner [neald@beta.datastorm.com]
- Macintosh: Alan Steremberg [alans@umich.edu]
- John Stiles [jstiles@cello.gina.calstate.edu]
-
- If you would like to port ColEm to another system, or make changes in
- ColEm's code *please*, contact me by email or some other means. Note, that
- ColEm source code is freely distributable, but it is *not* public domain.
- You can not use it in commercial purposes unless you contact me to arrange
- the conditions of such usage and get my permission. Feel free to look at
- existing drivers as well as at other code. More explanations follow.
-
- The ColEm source code distribution includes C sources for a portable Coleco
- emulator, and screen/keyboard drivers for Unix/X and MSDOS. ColEm has been
- tested on following Unix systems:
-
- FreeBSD Linux SunOS Solaris AIX HP-UX Irix
-
-
-
- * FREQUENTLY ASKED QUESTIONS *
-
- 1. What is the complete list of command line options of ColEm?
- Use -help option. It will tell ColEm to display all options available in
- your version. Following are the currently available options:
-
- -verbose <level> - Select debugging messages [1]
- 0 - Silent 1 - Startup messages
- 2 - VDP 16 - Illegal CPU ops
- -ifreq <frequency> - Set external interrupts frequency [50Hz]
- -iperiod <period> - Set internal interrupts period [10000ops]
- -uperiod <period> - Number of interrupts per screen update [2]
- -help - Print this help page
- -autoa/-noautoa - Autofire/No autofire for button A [-noautoa]
- -autob/-noautob - Autofire/No autofire for button B [-noautob]
- -logsnd <filename> - Write soundtrack to a file [off]
- -trap <address> - [DEBUG] Trap execution when PC reaches address [FFFFh]
- -shm/-noshm - [UNIX] Use/don't use MIT SHM extensions for X [-shm]
- -saver/-nosaver - [UNIX] Save/don't save CPU when inactive [-saver]
-
- 2. What are the keys used in ColEm?
-
- [SPACE] - Fire1 button (also: A,S,D,F,G,H,J,K,L)
- [LALT] - Fire2 button (also: Z,X,C,V,B,N,M)
- [0]-[9] - Digit buttons
- [-] - # button
- [=] - . button
- [ESC] - Quit emulation (also: [F12])
-
- [SHIFT] and [CAPSLOCK] switch between joypads
-
- [F1] - Turn tracing on/off (in DEBUG mode)
-
- 3. Why is the emulator so slow on my PC?
- Because your PC is too slow to run it. The emulator is written entirely
- in C language and therefore is quite slow. Although it works on 486/33 and
- even 386/33 PCs, it runs best on a Pentium/90 or a DEC Alpha/150. You can
- try to speed it up by increasing -uperiod value controlling the number of
- interrupts between screen updates to 3-6, and by decreasing -iperiod value
- controlling the number of CPU cycles between interrupts to 2000-5000.
-
- 4. Where do I get the software?
- ftp://altair.komkon.com/pub/Coleco/
-
- 5. Where is the sound?
- Sound is only implemented in the Macintosh version of the emulator
- and the DOS version.
-
- 6. Can I compile the emulator with my Borland/Turbo C compiler?
- You can, given that your compiler creates executables using flat 32bit
- memory model. Two PC compilers which do that are WATCOM (using DOS4GW DOS
- extender) and GCC (using DJPP extender). The only 32bit Borland/Turbo C
- compiler that I'm aware is for Windows though.
-
- 7. I can't get some ROM images to work with the emulator.
- Try increasing -iperiod value to 10000 and higher. If you can't get ROM
- image to work, send it to me for analysis.
-
- 8. Is it legal to spread cartridge ROMs?
- NO. Nobody seems to care though, mainly because there is no profit to be
- made on these ROMs any longer. Nevertheless, be aware of the fact that by
- using commercial software you haven't bought, you are commencing an act of
- piracy. Not that I care, anyway...
-
- 9. When compiling emulator under Unix, I get "undefined name" errors.
- This means that your linker can not find the libraries necessary for the
- emulator (namely, libX11.a and libXext.a) or some additional libraries
- (like libsocket.a and libnsl.a) are required. Find these libraries in your
- system and modify the Makefile so that the final invocation of the C
- compiler has "-L<path_to_libs>" options. If you have no libXext.a library,
- try #undefining MITSHM option.
-
- 10. When starting emulator under Unix, I get X_ShmAttach error.
- You are probably trying to run the emulator on a remote Xterminal while
- it attempts to use shared memory for interfacing with X. Use -noshm option
- to tell it not to use shared memory.
-
- 11. The emulation starts under Unix, but then I get X_PutImage error.
- Unix/X version of the emulator currently needs 256-color X. Neither
- 2-color nor TrueColor Xterminals will work with the drivers included into
- the "official" distribution.
-
- 12. I start the Unix version of the emulator but the window stays black.
- Some other X application took over all available colors so that the
- emulation could not allocate any for itself. Check if you run XV,
- Netscape, or something similar.
-
-
-
- * COMPILATION TIPS *
-
- If you are compiling the emulator under Unix, use Makefile. Notice that
- #define UNIX is present in this case.
- The emulation is written in fairly portable C code and may therefore be
- compiled with any decent ANSI C compiler. It relies on a flat 32bit memory
- model though, so Borland compilers will choke on it. Standard CC or GCC
- should do the job under Unix, although beware of GCC code generation
- bugs. If you are working under MeSsyDOS, use WATCOM C which is known to
- work. Under (God prohibit) Windows, use Borland C++ which has 32bit
- compilation model. On Amiga, use SAS/C. On Macintoshes, use Metrowerks C.
- If you are using an Intel-based computer or any other machine which has
- least-significant-byte-first data layout (for example, DEC Alpha), insert
-
- #define LSB_FIRST
-
- in the beginning of Z80.h file. The emulator will not work otherwise.
- If you put
-
- #define DEBUG
-
- in the beginning of Z80.h, the emulator will print debugging information
- about CPU registers after executing each command. You can turn debugging
- on and off by setting Trace variable to 1 and 0 accordingly. Also, by
- setting Trap variable to some address you will make it start tracing when
- PC reaches this address (-trap option).
- When you port the program to a new machine, you have to write a set of
- drivers for keyboard, sprites, and all the screen modes you want to
- emulate. The emulator comes with a set of drivers for XWindows system.
- The common code for these drivers is located in Common.h and can be used
- for other systems too. Screen drivers use simple XSIZE*YSIZE array of
- bytes to generate image, so in most cases you will only need to adjust
- these drivers to your own needs. Note that the X11 drivers use so-called
- MIT Shared Memory Extension for fast transfers from buffer to a window. If
- you do not have MIT SHM extension in your system, remove
-
- #define MITSHM
-
- You can also turn MITSHM off (for example, if you use remote X terminal)
- by setting UseSHM variable to 0 before starting the emulation (-noshm
- option).
-
-
-
- * CODE STRUCTURE *
-
- Several other variables control the behaviour of the emulator. All of
- them should be set before starting the emulation in order to take effect:
-
- Verbose = 0..31
- Defines amount of debugging information printed by emulator. Default
- value is 1. Each bit of this variable enables printing of some kind
- of debugging info (VDP,CPU,memory,etc.).
- IPeriod = 1000..50000
- Defines how many CPU commands should be executed between two interrupts.
- Normal interrupt rate is 60Hz for NTSC systems or 50Hz for PAL systems.
- Default value of IPeriod is 10000.
- CPURunning = 0/1
- Set this variable to 0 to stop CPU and exit the emulation.
- AutoA = 0/1
- Emulate autofire on the first fire button. Default value is 0.
- AutoB = 0/1
- Emulate autofire on the second fire button. Default value is 0.
- SndName = "filename"
- When SndName is not NULL, ColEm will open a file with this name, and
- save the soundtrack into it. The default value is NULL.
- Trace = 0/1
- Print debugging information about CPU state. Default value is 1.
- #define DEBUG should be present in order to use this option. Tracing
- can be turned on and off during execution, for example, in keyboard
- driver.
- Trap = 0x0000..0xFFFF
- Automatically start tracing when PC reaches given address. #define
- DEBUG should be present in order to use this option.
- UPeriod = 1..10
- Defines how many interrupts should pass between two consequent screen
- updates. Default value of UPeriod is 2.
- CartName = "cartridge.file"
- Name of a .ROM file to load. Default value is "CART.ROM". This variable
- is ignored if no file exists.
- UseSHM = 0/1
- Use MIT SHM extension in X11 screen drivers. Default value is 1.
- #define MITSHM should be present in order to use this option.
-
- In order to run the emulation:
-
- 1. Set all necessary variables.
- 2. Initialize screen and keyboard drivers. In the case of X11 drivers,
- it is done by calling InitMachine() implemented in Unix.c and
- returning 1 on success or 0 otherwise.
- 3. Call StartColeco().
- 4. Call TrashColeco().
- 5. Shut down screen and keyboard (in X11 case, by calling TrashMachine()).
- 6. Exit the program.
-
- Take a look at ColEm.c to see an example of a sequence explained above.
-
-
-
- * THANKS TO... *
-
- o Hans Guijt [.NL]
- o Marcel de Kogel [.NL]
- o Neal Danner [USA]
- o Alan Steremberg [USA]
- o John Stiles [USA]
-
- ...and to all people who helped me with advices, information, ROM images,
- and encouragment.
-
-
- Marat.
-